package dto.Repair;

import com.alibaba.fastjson.annotation.JSONField;
import lombok.Data;
import lombok.NoArgsConstructor;


import java.sql.ResultSet;
import java.sql.SQLException;

@Data
@NoArgsConstructor
public class RespDate {
    private Integer id;

//    @JSONField(format = "yyyy-MM-dd HH:mm:ss")
//    @JSONField(format = "MMM dd, yyyy h:mm:ss aa")
    @JSONField(format = "yyyy-MM-dd")
    private java.util.Date date;

    @JSONField(name = "class")
    private Integer clazz;

    private String room;

    private Integer type;

    private  String reason;

    private  String name;

    private  Integer state;

    public RespDate(ResultSet rs) throws SQLException {
        this.id = rs.getInt("id");
        this.date = rs.getDate("date");
        this.clazz = rs.getInt("clazz");
        this.room = rs.getString("room");
        this.type = rs.getInt("type");
        this.reason = rs.getString("reason");
        this.name = rs.getString("name");
        this.state = rs.getInt("state");
    }

}
